﻿using System.Windows.Controls;
using System.Windows.Input;

namespace FileSystemCustomClasses.FileBrowserControl
{
	/// <summary>
	/// Interaction logic for FileBrowser.xaml
	/// </summary>
	public partial class FileBrowser : UserControl
	{
		public FileBrowser()
		{
			InitializeComponent();
		}

		private void UserControl_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
		{
			if (e.ChangedButton == MouseButton.XButton1)
			{
				//XButton1 is the "Back" button
				//Navigate up
			}

		}

		private void ListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
		{
			FileBrowserViewModel localViewModel = this.DataContext as FileBrowserViewModel;

			if (localViewModel != null)
			{
				localViewModel.ActivateCurrentItem();
			}
		}
	}
}
